<script>
import { DatePicker, DatePickerOptions } from "element-ui";
import { calendarShortcuts } from "@/utils/shortcuts";
import vm from '@/main.js'
export default {
  name: "DateRangePicker",
  mixins: [DatePicker],
  props: {
    type: {
      type: String,
      default: "daterange",
    },
    valueFormat: {
      type: String,
      default: "timestamp",
    },
    // defaultTime: {
    //   type: Array,
    //   default: (_) => ["00:00:00", "23:59:59"],
    // },
    pickerOptions: {
      type: DatePickerOptions,
      default: (_) => {
        return {
          shortcuts: calendarShortcuts,
          disabledDate(time) {
            return time.getTime() > Date.now();
          },
        };
      },
    },
    size: {
      type: String,
      default: "medium",
    },
    rangeSeparator: {
      type: String,
      default: ":",
    },
    startPlaceholder: {
      type: String,
      default:  vm.$t("Home.index26"),
    },
    endPlaceholder: {
      type: String,
      default:  vm.$t("Home.index27"),
    },
  },
};
</script>
<style lang="scss" scoped>
.el-range-editor.el-input__inner {
  width: 250px;
}
</style>
